<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function createPerson(age) {
      const _age = Symbol('_age');
      class Person {
        constructor({ age }) {
          this[_age] = age;
        }
        sayAge() {
          return this[_age];
        }
      }
      return new Person({ age });
    }
    const p = createPerson(12)

  </script>
</body>

</html>